#!/bin/bash
echo "Start of configure_apache.sh"

echo "Enabling mod_rewrite, mod_expires, mod_deflate and ssl, disabling cgi"
a2enmod deflate
a2enmod expires
a2enmod headers
a2enmod rewrite
a2enmod ssl

a2dismod cgi

a2dissite default

echo "Config changes"

echo "ServerName localhost" >> /etc/apache2/httpd.conf
echo "NameVirtualHost *:80" >> /etc/apache2/httpd.conf
echo "NameVirtualHost *:443" >> /etc/apache2/httpd.conf

echo "Reloading Apache"
/etc/init.d/apache2 force-reload

echo "End of configure_apache.sh"
